package com.feifan.oa.domain;

import com.feifan.common.annotation.Excel;
import com.feifan.common.core.domain.BaseEntity;
import com.feifan.system.domain.SysUser;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 员工考勤对象 tb_attendance
 * @author 非凡
 * @date 2020-09-19
 */
public class Attendance extends BaseEntity {
    private static final long serialVersionUID = 1L;

    private Long id;

    /**
     * 考勤时间
     */
    @Excel(name = "考勤时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date date;

    /**
     * 用户id
     */
    @Excel(name = "用户id")
    private SysUser sysUser;

    /**
     * 考勤类型
     */
    @Excel(name = "考勤类型")
    private Integer type;

    /**
     * 签到(迟到)时间
     */
    @Excel(name = "签到(迟到)时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date signInTime;

    /**
     * 签退(早退)时间
     */
    @Excel(name = "签退(早退)时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date signOutTime;

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public SysUser getSysUser() {
        return sysUser;
    }

    public void setSysUser(SysUser sysUser) {
        this.sysUser = sysUser;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Date getSignInTime() {
        return signInTime;
    }

    public void setSignInTime(Date signInTime) {
        this.signInTime = signInTime;
    }

    public Date getSignOutTime() {
        return signOutTime;
    }

    public void setSignOutTime(Date signOutTime) {
        this.signOutTime = signOutTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("date", getDate())
                .append("sysUser", getSysUser())
                .append("type", getType())
                .append("signInTime", getSignInTime())
                .append("signOutTime", getSignOutTime())
                .toString();
    }
}
